<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'userdate.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="./bamcss/bam.css">
	<script type="text/javascript" src="./plugin/jqueryqrcode/src/jquery.min.js"></script>
<style type="text/css">
	.layer_title{
		float: left;
	}
	.layer_table{
		float: left;
		margin-top: 1.5%;
		height:70%;
		float: left;
		width:40%;
	}
	.layer_table table {
		font-size:12px;
		height:100%;
		width:100%;
		color: #778899 ;
		background-color: #DCDCDC;
	}
	tr{
	}
	.layer_table td{
		width:25%;
		line-height:100%;
	}
	.layer_table .t{
		text-align: center;	
		
	}
	
	
	.layer_zhuti #td1 {
		width: 14%
	}
	.layer_zhuti #td2 {
		width: 18%
	}
	.layer_zhuti #td3 {
		width: 11%
	}
	
	.layer_zhuti iframe{
		height: 95%;
	}
	
	
</style>
<script type="text/javascript" src="./bamjs/bam.js" charset="gbk"></script>
<script type="text/javascript">
	 $(document).ready(function() {
	 	 $.ajax({
		   type: "get",
		   url: "${pageContext.request.contextPath}/state/userCase_caseTable.action",
		   data: {},
		   dataType:"json",
		   success: function(msg){
			    var obj = eval("("+msg+")");
	            var areaNum = obj.areaNum;
	            var online = obj.onlineNum;
	            var userNum = obj.userNum;
	            var netNum = obj.netNum;
				$("#areaNum").text(areaNum);
				$("#online").text(online);
				$("#userNum").text(userNum);
				$("#netNum").text(netNum);
		    },
	     	error:function(){
// 	   			alert("系统出错误,请联系技术人员");
		   }
		 });
	 });
	 
	 url = "${pageContext.request.contextPath}/state/userCase_usersList.action?";
	 
	function mohusousuo(){
		var sousuo = document.getElementById("sousuo").value;
		if(sousuo!="请输入关键词"){
			document.getElementById("iframe").src=url+"sousuo="+sousuo;
		}
	}
	
</script>

  </head>
  
  <body>
   		<div class="layer_head">
   			<div class="layer_title">用户情况</div>
   			<div class="layer_table">
	   			<table>
	   				<tr>
	   					<td class="t">开通项目:</td>
	   					<td class="d" id="areaNum"></td>
	   					<td class="t">用户数:</td>
	   					<td class="d" id="userNum"></td>
	   				</tr>
	   				<tr>
	   					<td class="t">上线人数:</td>
	   					<td class="d" id="online"></td>
	   					<td class="t">上网人数:</td>
	   					<td class="d" id="netNum"></td>
	   				</tr>
	   			</table>
   			</div>
   			<div class="layer_seek">
   					<input id="sousuo" type="text" value="请输入关键词" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" 
   					onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" 
   					onkeypress="if (event.keyCode == 13)mohusousuo();"/>
	   			<a href="javascript:void(0)" onclick="mohusousuo()"><div class="layer_search"></div></a>
   			</div>
			<div style="clear: both;"></div>
   		</div>
   		<hr>
   		
   		<div class="layer_zhuti">
   			<table>
   				<tr class="tr1">
   					<td id="td1">牛号</td>
	   				<td id="td1">昵称</td>
	   				<td id="td1">项目区域</td>
	   				<td id="td3">网络类型</td>
	   				<td id="td2">IP</td>
	   				<td id="td3">状态</td>
	   				<td id="td2">上网期限</td>
   				</tr>
   			</table>
   			<iframe  id="iframe" class ="layer_iframe" name="wrap_iframe" src="${pageContext.request.contextPath}/state/userCase_usersList.action" frameborder=0 ></iframe>
   		</div>
   		<div class="layer_bottom">
			<span class="span1" >**共 <span style="font-size: 14px;color: black;" id="span1"></span> 条数据 / 共
			<span style="font-size: 14px;color: black;" id="span2"></span>&nbsp;页 / 当前第
			<span style="font-size: 14px;color: black;" id="span3"></span>&nbsp;页***</span> 
			
			<span style="float: right;"><input id="tiao"style="width: 50px" type="number" min="1"/><button style="width: 50px" onclick="tiaozhuan()" >go</button></span>
			<button style="margin-right: 40px" onclick="moye()">末 页</button>
			<button style="margin-right: 20px" onclick="xiaye()">下页</button>
			<button style="margin-right: 20px" onclick="shangye()">上 页</button>
			<button style="margin-right: 20px" onclick="shouye()">首页</button>
			<div style="clear: both;"></div>
		</div>
		<input type="hidden" >
  </body>

</html>
